cmake_minimum_required(VERSION 2.8)
project(cuda_imgproc)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_BUILD_TYPE Release)

find_package(CUDA REQUIRED)
option(CUDA_USE_STATIC_CUDA_RUNTIME OFF)
if(WIN32)
	enable_language(CUDA)
endif(WIN32)

# project include directory
include_directories(${PROJECT_SOURCE_DIR}/src/)
include_directories(${PROJECT_SOURCE_DIR}/vendor/)
# cuda
include_directories(/usr/local/cuda/include)
link_directories(/usr/local/cuda/lib64)
# tensorrt
include_directories(/usr/include/x86_64-linux-gnu/)
link_directories(/usr/lib/x86_64-linux-gnu/)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Ofast -g -pthread -Wfatal-errors -D_MWAITXINTRIN_H_INCLUDED")

FILE(GLOB_RECURSE CUDA_SOURCES "src/*.cu")
FILE(GLOB_RECURSE CPP_SOURCES "src/*.cpp")

cuda_add_executable(
	sample 
	${CUDA_SOURCES} 
	${CPP_SOURCES} 
)

target_link_libraries(
	sample
	cudart
)
